function foo() {
    bar.apply(null, arguments);
}
function bar() {
    console.log(arguments);
}
foo(1, 2, 3, 4, 5);


function b(x, y, a) {
    //arguments[2]= 10;
    //alert(a);
    a = 10;
    console.log(arguments[2]);
}

b(1, 2, 3)



var f = (
    function f() {
        return '1';
    },
    function g() {
        return 2;
    }
)()
console.log(typeof (f));


console.log(undefined == null);
console.log(undefined === null);
console.log(isNaN('100'));
console.log(parseInt('1a') == 1);



function isNaN1(num) {
    var res = Number(num) + '';
    if (res == 'NaN') {
        return true;
    } else {
        return false;
    }
}
console.log(isNaN1('123'));


var a = '1'
function test() {
    var a = '2';
    this.a = '3';
    console.log(a);
}
test();
new test();
console.log(a);